<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>子标准条款维护基本信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="/systemStatic/style/admin.css">
    <link rel="stylesheet" href="/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="/css/public.css">
    <script type="text/javascript">
        var __ctx = "";
    </script>
</head>
<body>

<script type="text/html" template>
    <form class="layui-form" requrl="{{ serverPath.basePath }}/qbdms/wZbztkb/get" style="padding: 0px 30px;width: 100%;margin-left: auto;margin-right: auto" lay-filter="wZbztkbDataForm">

        <div style="margin: 15px 0px;height: 777px;overflow: auto;">
            <div class="layui-form-item" style="display: none;">
                <label class="layui-form-label">dicid</label>
                <div class="layui-input-block" style="width:650px;">
                    <input type="text" name="dicid" placeholder="请输入dicid"
                           autocomplete="off" class="layui-input " maxlength="50" fieldname="dicid">
                </div>
            </div>
            <!--<div class="layui-form-item" style="display: inline-block;">
                <label class="layui-form-label">typeid</label>
                <div class="layui-input-block" style="width:650px;">
                    <input type="text" name="typeid" placeholder="请输入typeid"
                           autocomplete="off" class="layui-input " maxlength="50" fieldname="typeid">
                </div>
            </div>-->
            <div class="layui-form-item" style="display: inline-block;">
                <label class="layui-form-label">标准条款代码<span style="color:red;">*</span></label>
                <div class="layui-input-block" style="width:650px;">
                    <select name="itemkey" lay-search="" lay-verify="required" lay-filter="itemkey"></select>
                </div>
            </div>
            <div class="layui-form-item" style="display: inline-block;">
                <label class="layui-form-label">子标准条款<span style="color:red;">*</span></label>
                <div class="layui-input-block" style="width:650px;">
                    <input type="text" name="itemname" autocomplete="off" lay-verify="required" class="layui-input " maxlength="50" fieldname="itemname">
                </div>
            </div>
            <div class="layui-form-item" style="display: inline-block;">
                <label class="layui-form-label">子标准条款内容</label>
                <div class="layui-input-block" style="width:650px;">
                    <input type="text" name="itemvalue" autocomplete="off" class="layui-input " maxlength="50" fieldname="itemvalue">
                </div>
            </div>
            <!--<div class="layui-form-item" style="display: inline-block;">
                <label class="layui-form-label">description</label>
                <div class="layui-input-block" style="width:650px;">
                    <input type="text" name="description" placeholder="请输入description"
                           autocomplete="off" class="layui-input " maxlength="50" fieldname="description">
                </div>
            </div>
            <div class="layui-form-item" style="display: inline-block;">
                <label class="layui-form-label">sn</label>
                <div class="layui-input-block" style="width:650px;">
                    <input type="text" name="sn" placeholder="请输入sn"
                           autocomplete="off" class="layui-input " maxlength="50" fieldname="sn">
                </div>
            </div>
            <div class="layui-form-item" style="display: inline-block;">
                <label class="layui-form-label">nodepath</label>
                <div class="layui-input-block" style="width:650px;">
                    <input type="text" name="nodepath" placeholder="请输入nodepath"
                           autocomplete="off" class="layui-input " maxlength="50" fieldname="nodepath">
                </div>
            </div>
            <div class="layui-form-item" style="display: inline-block;">
                <label class="layui-form-label">parentid</label>
                <div class="layui-input-block" style="width:650px;">
                    <input type="text" name="parentid" placeholder="请输入parentid"
                           autocomplete="off" class="layui-input " maxlength="50" fieldname="parentid">
                </div>
            </div>-->
        </div>

        <div class="layui-form-item" style="position: fixed;bottom: 15px;left: 0;margin-bottom: 0;width: 100%;">
            <div style="text-align: center;">
                <a lay-submit lay-filter="wZbztkb" class="layui-btn btn-n privateSubmit" requrl="{{serverPath.basePath}}/qbdms/wZbztkb/save">提交</a>
                <button type="reset" id="closeWindow" style="margin-left: 10px;" class="layui-btn btn-n layui-btn-danger btn-save">取消</button>
            </div>
        </div>
    </form>
</script>
<script src="/public/component.js" type="text/javascript"></script>
<script src="/layui/layui.js"></script>
<script>

    layui.config({
        base: serverPath.systemPath + staticPath.systemPath //静态资源所在路径
    }).extend({
        index: 'index' //主入口模块
    }).use(['index', 'common', 'laydate', 'jquery', 'commons','publicMethods'], function () {
        var laydate = layui.laydate;
        var $ = layui.jquery;
        var commons = layui.commons;
        var publicMethods = layui.publicMethods;
        var dateTimeFiledLen = $(".dateTimeFiled");
        for (var i = 0; i < dateTimeFiledLen.length; i++) {
            laydate.render({
                elem: dateTimeFiledLen[i] //指定元素
                , type: 'date'
                , trigger: 'click'
            });
        }

        //关闭当前页面
        $("#closeWindow").click(function () {
            window.location.href = serverPath.basePath + '/qbdms/wZbztkb/view/list';
        });

        var runId = "${runId}";
        if (runId == null || runId == '') {
            $("#hideAndShow").show();
        }
        var bztkList = ${bztkList};
        var _html = "<option></option>";
        $.each(bztkList, function (index, obj) {
            _html += "<option value='" + obj.itemValue + "'>" + obj.itemName + "</option>";
        });
        $("select[name='itemkey']").html(_html);

        var common = layui.common;
        var index = parent.layer.getFrameIndex(window.name);
        common.updateForm({
            name: 'wZbztkbDataForm',
            idValue: "${dicid}",
            primary: "dicid",
            updateCallback: function (data) {
                if (common.filterRecord(data)) {
                    if ($(".privateSubmit")) {
                        $(".privateSubmit").attr("disabled", false).css("pointer-events", "auto");
                    }
                    layer.alert(publicMethods.confirmStyle(data.msg),{title: false,skin: 'confirm-class'}, function (index) {
                        layer.close(index);
                        window.location.href = serverPath.basePath + '/qbdms/wZbztkb/view/list';
                    });
                } else {
                    layer.alert(publicMethods.confirmStyle(data.msg),{title: false,skin: 'confirm-class'});
                }
                return false;
            }
        });
    });
</script>
</body>
</html>